﻿using System.Net.Sockets;

namespace MessageHandler
{
	class ClientConnection
	{
		Socket socket;

		public Socket Socket
		{
			get { return socket; }
			set { socket = value; }
		}
		UserInfo userInfo;

		public UserInfo UserInfo
		{
			get { return userInfo; }
			set { userInfo = value; }
		}

		public override bool Equals(object obj)
		{
			if (obj is ClientConnection)
			{
				ClientConnection tmp = (ClientConnection)obj;
				return userInfo.Equals(tmp.userInfo);
			}
			else if (obj is UserInfo)
			{
				UserInfo tmp = (UserInfo)obj;
				return userInfo.Equals(tmp);
			}
			else if (obj is Socket)
			{
				Socket tmp = (Socket)obj;
			}
			return false;
		}
	}
}
